<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>CSS实现时间轴效果开发</title>
  </head>
  <style>
    body {
      margin: 0;
      background-image: linear-gradient(to right, #fdf1d8, #b1bbf9);
    }
    h3 {
      margin: 0;
    }
    .timer-axis {
      width: 804px;
      margin: 50px auto 0;
    }
    .timer-axis .left {
      position: relative;
      width: 400px;
      float: left;
      border-right: 4px solid #b1bbf9;
    }
    .timer-axis .right {
      position: relative;
      width: 400px;
      float: right;
      border-left: 4px solid #b1bbf9;
     
    }
    .timer-axis .dot {
      position: absolute;
      top: 50%;
      margin-top: -7px;
      display: block;
      width: 10px;
      height: 10px;
      background-color: #fff;
      border: 2px solid #b1bbf9;
      border-radius: 50%;
    }
    .left .dot {
      right: 0;
      margin-right: -9px;
    }
    .right .dot {
      left: 0;
      margin-left: -9px;
    }
    .timer-axis .arrow {
      position: absolute;
      top: 50%;
      margin-top: -10px;
      width: 0px;
      height: 0px;
    }
    .left .arrow {
      right: 0;
      border: 10px solid transparent;
      border-left: 10px solid #fff;
    }
    .right .arrow {
      left: 0;
      border: 10px solid transparent;
      border-right: 10px solid #fff;
    }
    .timer-axis .content {
      border-radius: 20px;
      background-color: #fff;
      padding: 15px;
    }
    .left .content {
      margin-right: 20px;
    }
    .right .content {
      margin-left: 20px;
    }
  </style>
  <body>
    <div class="timer-axis">
      <div class="left">
        <span class="dot"></span>
        <div class="arrow"></div>
        <div class="content">
          <h3>你还好吗？</h3>
        </div>
      </div>
      <div class="right">
        <span class="dot"></span>
        <div class="arrow"></div>
        <div class="content">
          <h3>我很好~</h3>
        </div>
      </div>
    </div>
  </body>
</html>
